package service;

import dao.NewsDaoImpl;
import entity.News;

import java.util.List;

public class NewsDaoService {
    public int createNews(News news) {
        return new NewsDaoImpl().createNews(news);
    }

    public List<News> selectNewsType(int type, int pageSize, int pageNum,int state) {
        return new NewsDaoImpl().selectNewsType(type, pageSize, pageNum, state);
    }
    public Long newsCount(int type){return new NewsDaoImpl().newsCount(type);}
    public News selectByNewsId(String newsId){return  new NewsDaoImpl().selectByNewsId(newsId);}
    public List<News> selectNewsByUid(int uid,int state){return new NewsDaoImpl().selectNewsByUid(uid,state);}
    public int deleteNews(String newsId){return new NewsDaoImpl().deleteNews(newsId);}
}
